# It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Desktop Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description - Script to ensure that only admins can change the state of the WiFi # Configuration Type - COMPUTER if [ $# == '0' ]; then /usr/libexec/airportd prefs RequireAdminIBSS=YES RequireAdminNetworkChange=YES RequireAdminPowerToggle=YES ret=$? if [ $ret == "0" ]; then echo "Now only admin can change the WiFi state" else echo "Error in the executing the code" fi exit $ret else echo "Invalid Arguments - Please refer description of the script" exit 1 fi